<div class="fm-content">
  <div class="title">
    <i nz-icon [type]="'desktop'"></i>
    &nbsp;&nbsp;配图样式
  </div>
  <div class="clwork">
    <div class="top">
      <input nz-input placeholder="名称" class="fm-input first-input" [(ngModel)]="fs.queryObject['name:like']" />
      <nz-select [(ngModel)]="fs.queryObject['browser:like']" class="fm-input" (nzOpenChange)="browserDic.load('0')"
        name="sbrowser" [nzPlaceHolder]="'浏览器'">
        <nz-option *ngFor="let option of browserDic.datas" [nzLabel]="option.display" [nzValue]="option.id">
        </nz-option>
        <nz-option *ngIf="browserDic.isLoading" nzDisabled nzCustomContent>
          <i nz-icon type="loading" class="loading-icon"></i>加载中...
        </nz-option>
      </nz-select>
      <nz-select [(ngModel)]="fs.queryObject['terminal:like']" class="fm-input" (nzOpenChange)="terminalDic.load('0')"
        name="sterminal" [nzPlaceHolder]="'终端'">
        <nz-option *ngFor="let option of terminalDic.datas" [nzLabel]="option.display" [nzValue]="option.id">
        </nz-option>
        <nz-option *ngIf="terminalDic.isLoading" nzDisabled nzCustomContent>
          <i nz-icon type="loading" class="loading-icon"></i>加载中...
        </nz-option>
      </nz-select>

      <nz-button-group class="fm-search-input">
        <button nz-button nzType="primary" (click)="fs.loadData(true)">查询</button>
        <button nz-button (click)="fs.resetQueryObject() && fs.loadData(true)">重置</button>
      </nz-button-group>
      <div class="tool-right">
        <nz-button-group>
          <button nz-button [nzType]="'primary'" (click)="editRow(false)">新增</button>
          <button nz-button (click)="fs.editRow()">编辑</button>
          <button nz-popconfirm nzTitle="确认删除选择项?" (nzOnConfirm)="fs.delEntitys()" nzPlacement="bottomRight"
            nz-button>删除</button>
        </nz-button-group>
      </div>
    </div>

    <!--左侧栏方案列表信息-->
    <div class="left top-left">
      <nz-tree nzAsyncData (nzClick)="fs.loadDataEx($event.node.key)" [nzData]="sideDic.treeDatas"
        (nzExpandChange)="sideDic.expand($event)">
      </nz-tree>
    </div>

    <!-- 右则样表单主体 -->
    <div class="right top-right">
      <div class="table">
        <nz-table nzSize="middle" nzShowSizeChanger [nzPageSizeOptions]='[ 10, 15, 20, 30, 40, 50 ]'
          [nzFrontPagination]="false" [nzData]="fs.datas" [nzLoading]="fs.isLoading || fs.isDeleing"
          [nzTotal]="fs.rowsCount" [(nzPageIndex)]="fs.pageIndex" [(nzPageSize)]="fs.pageSize"
          (nzPageIndexChange)="fs.loadData()" (nzPageSizeChange)="fs.loadData(true)">
          <thead (nzSortChange)="fs.sort($event)" nzSingleSort>
            <tr>
              <th nzWidth="80px" nzShowCheckbox [(nzChecked)]="fs.allChecked" [nzIndeterminate]="fs.indeterminate"
                (nzCheckedChange)="fs.checkAll($event)"></th>
              <th>名称</th>
              <th nzWidth="15%">浏览器</th>
              <th nzWidth="15%">终端</th>
              <th nzWidth="15%">雪碧图</th>
              <th nzWidth="15%">有效</th>
            </tr>
          </thead>
          <tbody>
            <tr *ngFor="let data of fs.datas">
              <td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="fs.refreshCheckStatus()">
              </td>
              <td><span (click)="editRow(data)" class="form-edit">{{data.name}}</span></td> 
              <td>{{data.browserName}}</td>
              <td>{{data.terminalName}}</td>
              <td>{{data.spriteName}}</td>
              <td>{{data.valid | boolReform}}</td>
            </tr>
          </tbody>
        </nz-table>
      </div>
    </div>
  </div>
</div>